<?php
class Pacienti extends CI_Controller {

	public function __construct()
	{
		parent::__construct();
		$this->load->model('pacienti_model');
	}

	public function index()
	{
		$this->session->set_userdata('pacient', 'empty');
		$data['patients'] = $this->pacienti_model->get_patients();
		$data['diets'] = $this->pacienti_model->get_diets();
		$data['title'] = 'NIS - Hlavná stránka';
	
		$this->load->view('templates/header', $data);
		$this->load->view('project/pacienti_view', $data);
		$this->load->view('templates/footer');
	}
	
	public function pridaj_dietu() { redirect('dieta/pridaj'); }
	public function pridaj_pacienta() { redirect('project/register_pacienta'); }
}